<template>
  <div style="position:absolute; left: 20%; top: 25%; background: red; width: 200px; height:200px;" v-show="is">
    <a @click="ok">ok</a>
    <br />
    <br />
    <br />
    <br />
    <a @click="cancle">cancle</a>
  </div>
</template>
<script>
export default {
  name: "MsgConfirm",
  props: ["sb"],
  data() {
    return {
      is: false,
      ons: null,
      onf: null
    };
  },
  created() {
    console.log('asdfasdfasdf')
    console.log(this.sb);
    this.ons = this.sb;
  },
  methods: {
    ok() {
      this.ons();
    },
    cancle() {
      this.is = false;
      this.onf();
    },
    confirm(ons, onf) {
      console.log("confirm");
      this.onf = onf;
      this.ons = ons;
    }
  }
};
</script>
